#include "./../Include/public.h"
void update_stuBySno()
{
	printf("输入要修改学生的学号:\n");
	char sno[12];
	scanf("%s", sno);
	
	FILE *f;
 	f = fopen("./data/log.log", "a+");
       time_t now ;
       struct tm *tm_now ;
       time(&now) ;
       tm_now = localtime(&now) ;
  		fprintf(f,"datetime: %d-%d-%d %d:%d:%d\n",tm_now->tm_year+1900, tm_now->tm_mon+1, tm_now->tm_mday, tm_now->tm_hour, tm_now->tm_min, tm_now->tm_sec) ;
  	fprintf(f, "update student: %s\n",sno);
  	fclose(f);
	printf("输入姓名进行修改:\n");
	char name[20];
	scanf("%s", name);
	struct stu* p = head_stu;
	while (p != NULL) {
		if (!strcmp(p->sno,sno)) {
			strcpy(p->name, name);
			return ;
		}
		p = p->next;
	} 
	printf("学生不存在!\n");
	 
}
